package com.itheima.service.impl;

import com.itheima.dao.AccountDao;
import com.itheima.po.Account;
import com.itheima.service.AccountService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * ClassName:AccountServiceImpl
 * Package:com.itheima.service.impl
 * Description:账户的业务层实现类
 * Date:2020/2/21 15:14
 * User: snow
 */
@Service("accountService")
public class AccountServiceImpl implements AccountService {
	@Resource(name = "accountDao")
	private AccountDao accountDao;


	public List<Account> findAllAccount() {
		return accountDao.findAllAccount();
	}

	public Account findAccountById(Integer id) {
		return accountDao.findAccountById(id);
	}

	public void saveAccount(Account account) {
		accountDao.saveAccount(account);
	}

	public void updateAccount(Account account) {
		accountDao.updateAccount(account);
	}

	public void deleteAccount(Integer id) {
		accountDao.deleteAccount(id);
	}
}
